<?php
/**
 * Created by PhpStorm.
 * User: Soha_Ros
 * Date: 17/6/11
 * Time: 下午4:38
 */

namespace ActionsHttp;


use Data\Restaurant_DAO;

class RestaurantInfoAnnounceSet extends BaseActionHttp
{
    public function doAction() {

        parent::doAction();

        // 商铺id
        $restaurant_id = $_SESSION[RESTAURANT_ID];
        $restaurant_id = 1;

        $restaurant_record = Restaurant_DAO::getRecord($restaurant_id);

        if (!$restaurant_record) {
            return $this->SendErrMsg("没有该商铺");
        }

        $restaurant_record->setANNOUNCEMENT($this->data[ANNOUNCEMENT]);

        // 更新
        Restaurant_DAO::update($restaurant_record);

        // 返回数据
        $this->ResponseDataToCurrentClient();

    }
}